package edu.whut.mall.admin.service;

import edu.whut.mall.admin.domain.GroupBuyCategoryParams;
import edu.whut.mall.admin.domain.GroupBuyRuleParams;
import edu.whut.mall.admin.vo.GroupBuyCategoryVo;
import edu.whut.mall.admin.vo.GroupBuyRuleVo;
import edu.whut.mall.common.api.CommonPage;

/**
 * @program: d9lab-mall
 * @description: 团购功能接口
 * @author: Wayne
 * @create: 2020-05-15 15:21
 **/
public interface IGroupBuyService {
    /**
     * 新增一个团购分类
     * @param groupBuyCategoryParams
     * @return
     */
    Integer insertOneGroupBuyCategory(GroupBuyCategoryParams groupBuyCategoryParams);

    /**
     * 更新一个团购分类详情
     * @param groupBuyCategoryParams
     * @return
     */
    Integer updateOneGroupBuyCategory(GroupBuyCategoryParams groupBuyCategoryParams);

    /**
     * 上下架团购分类
     * @param categoryId
     * @param status
     * @return
     */
    Integer updateOneGroupBuyCategoryStatus(Long categoryId, Integer status);

    /**
     * 删除一个团购分类
     * @param categoryId
     * @return
     */
    Integer deleteOneGroupBuyCategory(Long categoryId);

    /**
     * 新增一个团购规则
     */
    Integer insertOneGroupBuyRule(GroupBuyRuleParams groupBuyRuleParams);

    /**
     * 更新一个团购规则详情
     * @param groupBuyRuleParams
     * @return
     */
    Integer updateOneGroupBuyRule(Long ruleId, GroupBuyRuleParams groupBuyRuleParams);

    /**
     * 更新团购规则状态
     * @param ruleId
     * @param status
     * @return
     */
    Integer updateOneGroupBuyRuleStatus(Long ruleId, Integer status);

    /**
     * 删除一个团购规则
     * @param ruleId
     * @return
     */
    Integer deleteOneGroupBuyRule(Long ruleId);

    /**
     * 列出所有的团购分类
     * @return
     */
    CommonPage<GroupBuyCategoryVo> listGroupBuyCategoryVos(Integer pageNum, Integer size);

    /**
     * @Description 更具团购分类获取团购规则
     * @param categoryId
     * @param pageNum
     * @param size
     * @return
     * @Author lvfanbing
     * @Date 2020/11/12 10:14
     */
    CommonPage<GroupBuyRuleVo> listGroupBuyRuleByGroupBuyCategoryId(Long categoryId, Long merchantId, Integer pageNum, Integer size);

 }
